#include <iostream>
#include <vector>
#include <cstdlib>

void ReadInput (int *elements, int array_size) {
    for (int iteration = 0; iteration < array_size; ++iteration) {
        int element;
        std::cin >> element;
        *(elements + iteration) = element;
    }
}

template <typename iterator_type, typename data_type>
std::pair<iterator_type, iterator_type> Partition (iterator_type begin, iterator_type end, data_type element) {
    iterator_type begin_copy = begin, end_copy = end;
    --end;
    // whole array partition
    while (begin != end) {
        while (*begin < element) {
            ++begin;
        }
        while (*end > element) {
            if (begin == end) {
                break;
            }
            --end;
        }
        if (begin < end) {
            std::swap(*begin, *end);
            begin++;
        }
    }
    // first part partition with (element - 1)

    while (begin_copy != begin) {
        while (*begin_copy < element - 1) {
            ++begin_copy;
        }
        while (*begin > element - 1) {
            if (begin_copy == begin) {
                break;
            }
            --begin;
        }
        if (begin_copy < begin) {
            std::swap(*begin_copy, *begin);
            begin_copy++;
        }
    }

    return std::make_pair(begin_copy, end);
}

template <typename iterator_type>
void Sort (iterator_type begin, iterator_type end) {
    if (end - begin <= 1) {
        return;
    }
    if (end - begin == 2) {
        if (*begin > *(begin + 1)) {
            std::swap(*begin, *(begin + 1));
        }
        return;
    }
    std::pair<iterator_type, iterator_type> borders;
    borders = Partition (begin, end, *(begin + (rand() % (end - begin))));
    Sort (begin, borders.first);
    Sort (borders.second, end);
}

void PrintAnswer (int *answer, int array_size) {
    for (int element_index = 0; element_index < array_size; ++element_index) {
        std::cout << *(answer + element_index) << " ";
    }
}

int main() {
    int array_size;
    std::cin >> array_size;
    if (array_size == 0) {
        return 0;
    }
    int elements[array_size];
    ReadInput (elements, array_size);
    Sort (elements, elements + array_size);
    PrintAnswer (elements, array_size);
    return 0;
}